//package io.renren.common.redis.aspect;
//
////import io.renren.common.redis.aspect.components.RepeatRequestComponent;
//import io.renren.modules.sys.entity.SysUserEntity;
//import org.apache.shiro.SecurityUtils;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Pointcut;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
//import org.springframework.core.annotation.Order;
//
///**
// * 登录用户请求防重发处理,Order=0优先于RedissonLockAspect
// *
// * @date 2020年3月24日
// */
//@Aspect
//@ConditionalOnBean(RepeatRequestComponent.class)
//@Order(0)
//public class RepeatRequestAspect {
//    @Autowired
//    private RepeatRequestComponent repeatRequestComponent;
//
//    @Pointcut("execution(* com.*..*.controller.*.*(..))")
//    private void controllerAspect() {
//    }
//
//    @Around("controllerAspect()")
//    public Object controllerAspectAround(ProceedingJoinPoint joinPoint) throws Throwable {
//        SysUserEntity user = (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
//        return repeatRequestComponent.exec(joinPoint, user.getUserId().toString());
//    }
//}
